package com.xyzwps.mvckotlin.handler.helper

import org.springframework.web.reactive.function.BodyExtractors
import org.springframework.web.reactive.function.server.ServerRequest
import reactor.core.publisher.Mono

fun <T> ServerRequest.body(clazz: Class<T>): Mono<T> = this.body(BodyExtractors.toMono(clazz))